package com.itheima.domain;

import lombok.Data;

@Data
public class CartItem {
    private Route route;//商品
    private Integer num;//数量
    private Double subTotal;//小计
    //重写小计get 方法
    public Double getSubTotal(){
        subTotal=route.getPrice()*num;
        return subTotal;

    }
}
